import 'package:bruno/bruno.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:sph_shipper/AppConfig/Config.dart';
import 'package:sph_shipper/Order/WaybillDetails/AirRunningStandard.dart';
import 'package:sph_shipper/Order/WaybillDetails/CancelWaybillList.dart';

class CancelWaybillPrompt extends StatefulWidget {
  const CancelWaybillPrompt({super.key, required this.waybillId, required this.despoit});
  final String waybillId;
  final String despoit;
  @override
  State<CancelWaybillPrompt> createState() => _CancelWaybillPromptState();
}

class _CancelWaybillPromptState extends State<CancelWaybillPrompt> {
  @override
  Widget build(BuildContext context) {
    final screenSize = MediaQuery.of(context).size;
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        backgroundColor: Colors.white,
      ),
      body: Column(
        children: [
          Expanded(child: ListView(
            children: [
              Image.asset("lib/Images/OrderList/取消运单提示图片.png",width: screenSize.width,height: 194.h,),
              Container(
                width: screenSize.width-44.w,
                padding: EdgeInsets.only(left: 22.w,right: 22.w),
                child: Text("请您及时联系司机，避免司机已经出发产生空驶损失。",style: TextStyle(color: Colors.black,fontSize: 18.sp),),
              ),
              Container(
                width: screenSize.width-44.w,
                padding: EdgeInsets.only(left: 22.w,right: 22.w,top: 10.h),
                child: Text("因您的责任导致司机放空，您需要承担司机放空费用。",style: TextStyle(color:MyColors.textColor,fontSize: 14.sp),),
              ),
              GestureDetector(
                child:  Container(
                  width: screenSize.width-44.w,
                  padding: EdgeInsets.only(left: 22.w,right: 22.w,top: 10.h),
                  child: Text("查看补偿标准 >",style: TextStyle(color:MyColors.themeColor,fontSize: 14.sp),),
                ),
              onTap: (){
                Navigator.push(context,
                    MaterialPageRoute(builder: (context) {
                      return AirRunningStandard(
                      );
                    }));

              },
              ),
            ],
          ),
          ),
          Container(
            height: 85.h,
            padding: EdgeInsets.only(left: 10.w,right: 10.w,top: 10.h,bottom: 40.h),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                BrnSmallOutlineButton(
                  title: '继续取消',
                  radius: 30,
                  lineColor: MyColors.themeColor,
                  textColor: MyColors.themeColor,
                  width: (screenSize.width-30.w)/2,
                  onTap: () {

                    Navigator.push(context,
                        MaterialPageRoute(builder: (context) {
                          return CancelWaybillList(waybillId: widget.waybillId, deposit: widget.despoit,
                          );
                        }));
                  },
                ),
                SizedBox(width: 10.w,),
                BrnSmallMainButton(
                  title: '暂不取消',
                  bgColor: MyColors.themeColor,
                  textColor: Colors.white,
                  radius: 30,
                  width: (screenSize.width-30.w)/2,
                  onTap: () {
                    Navigator.pop(context);
                  },
                )
              ],
            ),
          )
        ],
      ),
    );
  }
}
